home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
cb.z
/
cb
Wrap
Text File
|
1998-10-30
|
3KB
|
130 lines
CCCCBBBB((((1111)))) SSSSiiiilllliiiiccccoooonnnn GGGGrrrraaaapppphhhhiiiiccccssss CCCCBBBB((((1111))))
NNNNAAAAMMMMEEEE
cb - C program beautifier
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ccccbbbb [ ----ssss ] [ ----jjjj ] [ ----nnnn ] [ ----llll leng ] [ ----tttt shiftwidth ] [ file ... ]
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The _c_b command reads C programs either from its arguments or from the
standard input, and writes them on the standard output with spacing and
indentation that display the structure of the code. Under default
options, _c_b preserves all user new-lines.
_c_b accepts the following options.
----ssss Canonicalizes the code to the style of Kernighan and Ritchie
in _T_h_e _C _P_r_o_g_r_a_m_m_i_n_g _L_a_n_g_u_a_g_e.
----jjjj Causes split lines to be put back together.
----nnnn Causes pairs of left braces with only whitespace between them
to be interpreted as code braces. By default, such pairs of
braces are assumed to be structure initializations and less
indentation is done; this causes code-brace pairs to produce
odd output. An example will clarify this.
File t.c:
int x; main() { { { x = 3; } } }
ccccbbbb tttt....cccc produces
int x;
main() {
{ {
x = 3;
}
}
}
Note the right braces prematurely at the left margin. On the
other hand, ccccbbbb ----nnnn tttt....cccc produces
int x;
main() {
{
{
x = 3;
}
}
}
Page 1 Release 6.4
CCCCBBBB((((1111)))) SSSSiiiilllliiiiccccoooonnnn GGGGrrrraaaapppphhhhiiiiccccssss CCCCBBBB((((1111))))
----llll _l_e_n_g Causes _c_b to split lines that are longer than _l_e_n_g.
----tttt _s_h_i_f_t_w_i_d_t_h
tells _c_b to use a soft tab stop which is different from the
hard tabs. Tab characters will be used to save space where
possible.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
cc(1).
Kernighan, B. W., and Ritchie, D. M., _T_h_e _C _P_r_o_g_r_a_m_m_i_n_g _L_a_n_g_u_a_g_e.
Prentice-Hall, 1978.
BBBBUUUUGGGGSSSS
Punctuation that is hidden in preprocessor statements will cause indenta-
tion errors.
Page 2 Release 6.4